1. Technical Field
The invention relates to apparatus and methods for detecting and compensating leakage currents in capacitive sensing circuits.
2. Discussion of the Related Art
Capacitive sensing elements have found wide use present day consumer electronics. For example, capacitive sensing elements may be incorporated in touch-sensitive user interfaces for various electronic devices such as computers, tablets, personal digital assistants, video gaming devices, and cellular phones. Capacitive sensing circuits may be used to sense changes in capacitance of a capacitive sensing element due to some type of perturbation, e.g., when an object such as a human finger is brought near the capacitive element. Some capacitive sensing circuits are used in commercial devices to enable device control or device operation via a touch-sensitive user interface. Capacitive sensing circuits may find applications in simple on/off touch pads, touch-sensitive operation panels, touch-sensitive track pads for computer operation, and touch-sensitive screens. Touch-sensitive components can provide a convenient user interface for microprocessor-based devices and may obviate the need for more cumbersome buttons or keyboards in some applications.
One example of a capacitive sensing circuit is shown in FIG. 1. The circuit shown is configured to sense or detect a change in a current Iin that flows to or from the capacitive sensing element 110 as a result of a change in capacitance C1 of the capacitive element. There may be a small potential applied to one node of capacitive element 110. Capacitive element 110 may be two plates of a capacitive sensor that is configured to be touched, or nearly touched, by a human finger or some device. Unperturbed, the two plates may exhibit a capacitance C1. As a finger or some other conductive object approaches the capacitive element 110, its capacitance C1 changes. The change in capacitance can lead to production of a current Iin associated with the change in capacitance. This can be understood from the following basic relation.C=g/V  (1)
where q represents the charge stored by the capacitor and V represents a voltage applied across the capacitor. If C varies with time and V is held constant, then the charge q varies with time causing current flow to or from the capacitive element 110.
In FIG. 1, a change in current Iin may be sensed by current sensing circuitry 150, which may comprise an operational amplifier 120 and a capacitor C2 coupled between the op-amp's output and inverting input. The non-inverting input may be connected to a reference potential. The current sensing circuit 150 may provide a voltage output Vout that is proportional to changes in capacitance of the capacitive element 110. Accordingly, the current sensing circuit 150 may also be referred to as a capacitive sensing circuit herein.
In an ideal capacitive sensing device, all the change in current Iin attributable to changes in capacitance of the capacitive element 110 would be received by the current sensing circuit 150. That is, ideally IA would be the same as Iin. However, in practice the current sensing circuit 150 is protected from potential damage that may be caused by electrostatic discharge (ESD). In order to protect the circuit, an ESD diode D1 130 is connected between a node common to the capacitive element 110 and the current sensing circuit 150 and a ground (GND) node or reference voltage node as shown in FIG. 1. The ESD diode may or may not be considered to be part of current sensing circuit 150. Unfortunately, the introduction of the ESD diode 130 results in a leakage current ID1. Current IA now becomes Iin−ID1. Additionally, the leakage current through diode 130 changes with temperature. At room temperature, it may be negligibly small. However, the leakage current ID1 can increase to be almost equal to Iin at temperatures of around 50 degrees Celcius, leaving only a very small current IA to be sensed by the current sensing circuit 150. Reduction in the magnitude of current IA can lead to noise-related errors and poor user-interaction with devices that use such capacitive-sensing elements and circuitry.